<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>6订单</title>
		<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
	</head>
	<body ng-app="myapp" ng-controller="orderController" ng-init="loadDatas()">
		<!--导航条-->
		<div>
			<ng-include src="'nav.html'"></ng-include>
		</div>
		<!--导航条-->
		<div class="container">
			<div class="row">
				<div class="col-md-8 col-md-offset-2">
					<p>订单编号:{{order.id}}</p>
					<table class="table table-bordered">
						<tr>
							<th>编号</th>
							<th>商品</th>
							<th>价格</th>
							<th>数量</th>
							<th>小计</th>
							<th>操作</th>
						</tr>
						<tr ng-repeat="orderitem in order.orderitem">
							<td>{{$index+1}}</td>
							<td>{{orderitem.pname}}</td>
							<td>{{orderitem.price|currency:"￥"}}</td>
							<td><input type="number" ng-blur="check(orderitem.pid,$event)" value="{{orderitem.qty}}"></td>
							<td>{{orderitem.price*orderitem.qty|currency:"￥"}}</td>
							<td><a href="javascript:void(0);" type="button" ng-click="deleteItemsById(orderitem.pid,order.id)">删除</a></td>
						</tr>
					</table>
					<div class="col-md-offset-10 col-md-2">
						<ul class="list-inline">
							<li>商品金额:{{order.total|currency:"￥"}}</li>
						</ul>
					</div>
					<div class="col-md-8">
						<form class="form-horizontal">
							<div class="form-group">
								<label for="exampleInputAddress" class="col-sm-2 control-label">地址</label>
								<div class="col-sm-6">
									<input type="text" class="form-control" ng-model="address" id="exampleInputAddress" placeholder="地址">
								</div>
							</div>
							<div class="form-group">
								<label for="exampleInputName" class="col-sm-2 control-label">收货人</label>
								<div class="col-sm-6">
									<input type="text" class="form-control" ng-model="receciver" id="exampleInputName" placeholder="收货人">
								</div>
							</div>
							<div class="form-group">
								<label for="exampleInputPhone" class="col-sm-2 control-label">电话</label>
								<div class="col-sm-6">
									<input type="text" class="form-control" ng-model="tel" id="exampleInputPhone" placeholder="电话">
								</div>
							</div>
						</form>
						<div class="col-sm-6 col-sm-offset-2">
							<button type="submit" class="btn btn-default  btn-block" ng-click="addAddress(order.uid)">确认订单</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</body>

<script src="js/angularjs/angular.min.1.5.8.js"></script>
<script src="js/base/base.js"></script>

<script src="js/service/loginService.js"></script>
<script src="js/service/categoryService.js"></script>
<script src="js/service/myCartService.js"></script>
<script src="js/service/orderService.js"></script>

<script src="js/controller/navController.js"></script>
<script src="js/controller/orderController.js"></script>
</html>
